﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DTO;

namespace DAO
{
    public class DanhMucPhongDAO
    {
        public static DataTable LayDanhSachPhong()
        {            
            DataTable dt = new DataTable();
            try
            {
                sqlDataAccessHelper connect = new sqlDataAccessHelper();                
                dt = connect.ExecuteQuery("Select p.MaPhong,p.TenPhong,lp.TenLoaiPhong,lp.DonGia,p.GhiChu From PHONG p , LOAIPHONG lp Where p.MaLoaiPhong=lp.MaLoaiPhong");
            }
            catch(Exception ex)
            {
                Console.WriteLine(ex);
            }

            return dt;

        }
    }
}
